package com.handong.handserialprogram.widget.component;

import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.handong.handserialprogram.R;
import com.handong.handserialprogram.widget.guideview.Component;


/**
 * Created by binIoter on 16/6/17.
 */
public class SimpleComponent implements Component {

    private String mContent;

    public SimpleComponent(String text){
        mContent = text;
    }

    @Override
    public View getView(LayoutInflater inflater) {
        LinearLayout ll = (LinearLayout) inflater.inflate(R.layout.layer_frends, null);
        TextView content = (TextView) ll.findViewById(R.id.guideViewText);
        content.setText(mContent);
        return ll;
    }

    @Override
    public int getAnchor() {
        return Component.ANCHOR_BOTTOM;
    }

    @Override
    public int getFitPosition() {
        return Component.FIT_END;
    }

    @Override
    public int getXOffset() {
        return 0;
    }

    @Override
    public int getYOffset() {
        return 10;
    }
}
